feat(llm): add iFlytek Spark as a built-in provider#485
Merged
Conversation
Contributor
|
✅ OpenCodeReview: No comments generated. Looks good to me. |
Collaborator
|
Hello, you need to sign the CLA license before the merge |
Contributor
Author
I've signed the CLA. Thanks! |
lizhengfeng101
force-pushed
the
feat/iflytek-spark-provider
branch
2 times, most recently
from
July 24, 2026 15:23
33995bf to
daa27fc
Compare
Spark's official endpoint (https://spark-api-open.xf-yun.com/v1) is OpenAI-compatible, so it registers like the other OpenAI-protocol providers (deepseek, kimi, …). Adds the registry entry, the matching name in the provider-order test, and the provider table in the en/zh/ja configuration docs. Model ids are the domain values the HTTP endpoint accepts (4.0Ultra, generalv3.5, max-32k, generalv3, pro-128k, lite). Signed-off-by: FenjuFu <92919259+FenjuFu@users.noreply.github.com>
lizhengfeng101
force-pushed
the
feat/iflytek-spark-provider
branch
from
July 24, 2026 15:29
daa27fc to
b172642
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds iFlytek Spark as a built-in LLM provider.
The provider list already covers most major Chinese vendors — DashScope/Qwen, Volcano Engine, DeepSeek, Tencent Hunyuan, Kimi, Z.AI, Xiaomi MiMo, MiniMax, Baidu Qianfan — but iFlytek Spark was missing. Its official endpoint is OpenAI-compatible, so it slots in exactly like the other
openai-protocol providers.Changes
internal/llm/providers.go— new registry entry:BaseURL: https://spark-api-open.xf-yun.com/v1(Spark's OpenAI-compatible HTTP endpoint; the API password is sent as a bearer token)EnvVar: SPARK_API_KEYdomainvalues that endpoint accepts:4.0Ultra,generalv3.5,max-32k,generalv3,pro-128k,liteinternal/llm/providers_test.go— addediflytekto the expected provider-order list (ListProviders()sorts by name, so it sits betweenhy-tokenplanandkimi)pages/src/content/docs/{en,zh,ja}/configuration.md— added the provider to the config table in all three localesNotes
ProtocolOpenAIChatCompletionspath, same asdeepseek/kimi.TestListProviders_Orderexpectation exactly (18 providers, no duplicates) and that the three doc tables each gained one row.make testshould confirm on CI.spark-api-open.xf-yun.com/v1); the WebSocket hostspark-api.xf-yun.comuses HMAC-signed auth and is deliberately not used here.